package org.dromara.northstar.gateway.okx;

import org.dromara.northstar.common.event.FastEventEngine;
import org.dromara.northstar.gateway.IMarketCenter;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import lombok.extern.slf4j.Slf4j;

@Slf4j
@Configuration
public class OkxConfig {

    static {
        log.info("=====================================================");
        log.info("                  加载gateway-okx                    ");
        log.info("=====================================================");
    }

    @Bean
    OkxDataServiceManager okxDataServiceManager() {
        return new OkxDataServiceManager();
    }

    @Bean
    OkxGatewayFactory okxGatewayFactory(FastEventEngine feEngine, IMarketCenter mktCenter, @Qualifier("okxDataServiceManager") OkxDataServiceManager dsMgr) {
        return new OkxGatewayFactory(feEngine, mktCenter, dsMgr);
    }

    @Bean
    OkxGatewaySettings okxGatewaySettings() {
        return new OkxGatewaySettings();
    }

}
